package request

import (
	"gitcode.com/G-YT/iHealth25/server/model/common/request"
	"gitcode.com/G-YT/iHealth25/server/model/health"
	"time"
)

type Circle struct {
	Tid  uint   `json:"t_id" gorm:"column:t_id"` //所属版块ID
	Text string `json:"text" gorm:"column:text"` //文本
	Img  string `json:"img" gorm:"column:img"`   //图片
}

type Comment struct {
	ReplyId uint   `json:"reply_id" gorm:"column:reply_id;default:0"` //被回复的评论ID
	ToUid   uint   `json:"to_u_id" gorm:"column:to_u_id;default:0"`   //被评论&回复的用户ID
	Cid     uint   `json:"c_id" gorm:"column:c_id"`                   //健康圈ID
	Text    string `json:"text" gorm:"column:text"`                   //文本
}

type ReqCircle struct {
	Page     int  `json:"page"`
	PageSize int  `json:"pageSize"` // 每页大小
	Tid      uint `json:"tid" form:"tid" gorm:"column:t_id"`
}

type HealthCircleSearch struct {
	health.Circle
	StartCreatedAt *time.Time `json:"startCreatedAt" form:"startCreatedAt"`
	EndCreatedAt   *time.Time `json:"endCreatedAt" form:"endCreatedAt"`
	request.PageInfo
}

type ReqComments struct {
	Cid uint `json:"c_id"`
}

type ReqReport struct {
	Cid uint `json:"c_id"`
}

type CommentsSearch struct {
	health.CircleComment
	StartCreatedAt *time.Time `json:"startCreatedAt" form:"startCreatedAt"`
	EndCreatedAt   *time.Time `json:"endCreatedAt" form:"endCreatedAt"`
	request.PageInfo
}
